package cn.gson.springboot.model.dao;

import java.util.Date;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import cn.gson.springboot.model.pojos.OperationArrange;

public interface OpreArrangeDao extends CrudRepository<OperationArrange, Integer>{

	//根据住院号联合押金表和住院表查询
	@Query("SELECT o FROM OperationArrange o join o.operationRoom r where o.oparrangeEndtime >=?1 and o.oparrangeDate =?2 and r.operationroomId =?3 and o.oparrangeState=0")
	public OperationArrange selectArrangeTime(String endtime,Date opdate,Integer roomid);
		
}
